import request from '@/request/index.js'
const base = 'base' //http://101.42.107.47:30020文档

//获取示例说明标题列表数据
export const getExampleExplainTitleListApi = (data) => {
    return request({
        url: `/api/${base}/sample/title/find`,
        method: 'GET',
        params: data,
    })
}

//示例标题批量停用，启用
export const exampleTitleBatchApi = (data) => {
    return request({
        url: `/api/${base}/sample/title/batch`,
        method: 'POST',
        data,
    })
}

//获取示例列表内容列表数据
export const getExampleExplainListApi = (data) => {
    return request({
        url: `/api/${base}/sample/find`,
        method: 'GET',
        params: data,
    })
}

//示例内容批量停用，启用
export const exampleContentBatchApi = (data) => {
    return request({
        url: `/api/${base}/sample/batch`,
        method: 'POST',
        data,
    })
}

//添加示例项
export const addExampleItemApi = (data) => {
    return request({
        url: `/api/${base}/sample/add`,
        method: 'POST',
        data,
    })
}

//编辑示例项
export const editExampleItemApi = (data) => {
    return request({
        url: `/api/${base}/sample/edit`,
        method: 'POST',
        data,
    })
}

//获取所有示例
export const allExampleApi = () => {
    return request({
        url: `/api/${base}/sample/getAll`,
        method: 'get',
    })
}